#pragma once
#include "audionode.h"
#include <vector>

class CSubtractive :
	public CAudioNode
{
public:
	CSubtractive(void);
	~CSubtractive(void);

public:
    virtual void Start();
    virtual bool Generate();

    void SetFreq(double f) {m_freq = f;}
	void SetType(std::wstring t) {m_type = t;}
	void SetPitch(double p) {m_pitch = p;}
	void SetFrequency(double f) {m_frequency = f;}
	void SetBandwidth(double b) {m_bandwidth = b;}
	void SetTime(double t) {m_time = t;}
	void SetDuration(double d) {m_duration = d;}

	void SetWavetable(std::vector<double> w){m_wavetable = w;}

private:
    double m_freq;
    double m_phase;
	double m_pitch;
	std::wstring m_type;
	std::vector<double> m_wavetable;
	double m_frequency;
	double m_bandwidth;
	double m_a;
	double m_r;
	double m_costheta;
	double m_time;
	int m_wrloc;
	double m_duration;

	std::vector<double> m_yqueue;
};

